<template>
	<view class="commodity">
		<view class="slogan">
			<image src="../../../static/images/slogan.png" mode="heightFix"></image>
		</view>
		<view class="type_top">
			<view class="tt_l">
				<u-swiper height="100" :list="smallSwiper" keyName="image" showTitle :autoplay="true" circular></u-swiper>
			</view>
			<view class="tt_r">
				<view class="ttr_t">门店活动</view>
				<view class="ttr_b">只待你来</view>
			</view>
		</view>
		<view class="type_bottom">
			<view class="tb_l">
				<view class="tbl_t">
					<view class="title">
						<view class="b_title">限时折扣</view>
						<view class="s_title">超级会员日</view>
					</view>
					<view class="content">
						<image class="img" src="https://www.92hi.com/uploads/allimg/180411/2-1P4111J644964.png"></image>
					</view>
				</view>
				<view class="tbl_b"></view>
			</view>
			<view class="tb_r">
				<view class="tbr_t">
					<image class="img" src="https://pic3.zhimg.com/v2-2ccbc802df317051fe6eb8059fe74d96_1440w.jpg?source=172ae18b"></image>
				</view>
				<view class="tbr_b">
					<image class="img" src="https://img.zcool.cn/community/01ced85beba338a8012092521cc09f.png@1280w_1l_2o_100sh.png"></image>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		mapState
	} from 'vuex'
	export default {
		data() {
			return {}
		},
		computed: {
			...mapState(['smallSwiper'])
		},
		methods: {

		}
	}
</script>

<style lang="less" scoped>
	.commodity {
		position: relative;
		width: 100%;
		padding: 0 20rpx 20rpx 20rpx;
		box-sizing: border-box;

		.slogan {
			width: 100%;
			height: 80rpx;
			background-color: #0b0904;
			display: flex;
			justify-content: center;
			align-items: center;
			border-top-left-radius: 10rpx;
			border-top-right-radius: 10rpx;
			overflow: hidden;

			image {
				height: 60rpx;
			}
		}

		.type_top {
			width: 100%;
			height: 200rpx;
			margin-top: 10rpx;
			display: flex;
			justify-content: space-between;
			align-items: center;

			.tt_l {
				flex: 1;
				height: 200rpx;
				background-color: #cccccc;
				overflow: hidden;

				.swiper {
					width: 100%;
					height: 200rpx;

					image {
						width: 100%;
						height: 200rpx;
					}
				}
			}

			.tt_r {
				width: 200rpx;
				height: 200rpx;
				margin-left: 10rpx;
				background: #fffff4;
				display: flex;
				flex-direction: column;
				justify-content: center;
				align-items: center;
				font-weight: bold;

				.ttr_t {
					font-size: 28rpx;
					color: #ff9238;
				}

				.ttr_b {
					font-size: 28rpx;
					color: #aa2222;
				}
			}
		}
		.type_bottom{
			margin-top: 10rpx;
			width: 100%;
			height: 400rpx;
			border-bottom-left-radius: 10rpx;
			border-bottom-right-radius: 10rpx;
			overflow: hidden;
			display: flex;
			justify-content: center;
			align-items: center;
			.tb_l{
				width: 50%;
				height: 400rpx;
				padding: 20rpx;
				box-sizing: border-box;
				margin-right: 5rpx;
				background-color: #ffffff;
				.tbl_t{
					width: 100%;
					height: 400rpx;
					.title{
						width: 100%;
						height: 100rpx;
						.b_title{
							font-weight: bold;
							color: #aa2222;
						}
						.s_title{
							color: #ff9238;
							font-size: 26rpx;
						}
					}
					.content{
						width: 100%;
						height: calc(100% - 140rpx);
						.img{
							display: block;
							width: 100%;
							height: 100%;
							object-fit: cover;
						}
					}
				}
			}
			.tb_r{
				width: 50%;
				height: 400rpx;
				margin-left: 5rpx;
				display: flex;
				flex-direction: column;
				.tbr_t{
					width: 100%;
					flex: 1;
					margin-bottom: 5rpx;
					background-color: #ffffff;
					.img{
						display: block;
						width: 100%;
						height: 100%;
						object-fit: cover;
					}
				}
				.tbr_b{
					width: 100%;
					flex: 1;
					margin-top: 5rpx;
					background-color: #ffffff;
					.img{
						display: block;
						width: 100%;
						height: 100%;
						object-fit: cover;
					}
				}
			}
		}
	}
</style>